Module: client/safeFetch
Functions
default
▸ default(input, init?): Promise<Response>
Safe version of fetch that throws if a request returns a non-OK status code.
Parameters
| Name | Type |
|---|---|
input | RequestInfo | URL |
init? | RequestInit |
Returns
Promise<Response>
Throws
If the http request fails or the response status is not OK.
Throws
When a network error is encountered or CORS is misconfigured on the server-side.